<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>hello</title>
</head>

<body>
	<p>hello,world!</p>
	<form>
		First name: <input id="firstname" type="text" name="firstname"><br>
		Last name: <input id="lastname" type="text" name="lastname">
		<input type="button" value="Submit" onclick="setName()">
	</form>
	<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
	</script>
	<script>
		function setName() {
			$("p").html($("#firstname").val() + $("#lastname").val());
        }
	</script>
</body>
</html>